function fname = transiofilename(obj)
% transio::transiofilename  - return underlying filename
%
% FORMAT:       filename = transiofilename(tio_obj)
%
% Input fields:
%
%       tio_obj     valid transio object
%
% Output fields:
%
%       filename    filename used by transio object

% Version:  v0.7g
% Build:    9101517
% Date:     Oct-15 2009, 5:20 PM CEST
% Author:   Jochen Weber, SCAN Unit, Columbia University, NYC, NY, USA
% URL/Info: http://wiki.brainvoyager.com/BVQXtools

% argument check
if nargin < 1 || ...
    numel(struct(obj)) ~= 1 || ...
   ~istransio(obj)
    error( ...
        'transio:BadSubsRef', ...
        'No S subsref struct given.' ...
    );
end

% return filename
fname = obj.FileName;
